package com.t2t.top.devops.controller;

import com.t2t.top.devops.model.ResponseDTO;
import com.t2t.top.devops.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/api")
public class DemoController {

    @Autowired
    private DemoService demoService;

    @RequestMapping("/hello")
    public ResponseDTO hello(String name) {
        return ResponseDTO.success().data(demoService.hello(name));
    }

}
